Gene finding using ordered sets

ABSTRACT

A method and system for finding in a DNA sequence, a gene represented by an ordered set of marker strings. Sub-strings in the DNA sequence matching each marker string are identified. In a set ordered via occurrence of the marker strings in the ordered set of marker strings, the score and position of each sub-string whose score satisfies a matching constraint is recorded. For each except the last marker string, directed links are created between each identified sub-string that matches the marker string and any identified sub-strings that match the subsequent marker string, subject to the directed links satisfying an inter-marker length constraint. Traced are all paths that connect each identified sub-string that matches the first marker string to an identified sub-string that matches the last marker string using the directed links. The paths satisfy a sequence length constraint and are stored in a memory of a computer system.

This application is a divisional of Ser. No. 10/324,509, filed Dec. 20, 2002.

FIELD OF THE INVENTION

The present invention relates to finding sequences using ordered sets and more particularly to finding genes in DNA sequences.

BACKGROUND

Gene expression is a biological process by which a DNA sequence generates a protein. The process involves two steps, namely transcription and translation. Transcription produces a messenger RNA (mRNA) sequence using the DNA sequence as a template. The subsequent process, called translation, synthesizes the protein according to information coded in the mRNA. In eukaryotes (higher organisms), the region of the DNA coding for a protein is usually not continuous but comprises alternating stretches of introns (non-coding parts) and exons (coding parts that result in the production of a part of the protein). Six reading frames exist, of which only one contains the gene sequence. Hence, genes cannot generally be read directly from a DNA sequence.

There are more than 3 billion bases of human DNA sequences. In the human genome, only 2%-3% of the sequences comprise coding. As a consequence of the size of the database, manual searching for genes that code for proteins is not practical. A need thus exists for an automated method of finding genes.

Chris Burge and Samuel Karlin, in a paper entitled “Prediction of Complete Gene Structures in Human Genomic DNA”, Journal of Molecular Biology (1997) 268, pp. 78-94, discuss a probabilistic method to predict sequences which code for proteins (i.e. find gene sequences). However, this method is not optimised for finding a specific gene.

Mikhail S. Gelfand, Andrey A. Mimov, and Pavel A. Pevzner, in a paper entitled “Gene Recognition via Spliced Sequence Alignment”, Proceedings National Academy of Science (USA), August 1996, Volume 93, pp. 9061-9066, present a technique of finding high scoring blocks. The blocks are then combined to form a sequence, the weight of which is the optimal alignment score of the sequence with the target sequence. The blocks can be combined in many ways and the complexity of the problem increases with the number of blocks. Moreover, the second stage of finding the optimal alignment score increases the time required for completion of the algorithm. The technique does not take into account the presence of synonyms and consequent effects on the alignment scores.

International Patent Publication No. WO/9966302, published on 23 Dec. 1999, by the MUSC Foundation for Research and Development, and entitled “Recognition of Protein Coding Regions in Genomic DNA Sequences”, describes the use of neural networks to identify coding regions. Disadvantages associated with neural networks include the time necessary to train a network and the fact that information is stored in a form that is not easily understood by humans, restricts further analysis. In applications where target marker strings change rapidly, neural networks are not the best choice, given the time and effort required in training (both positive and negative samples are necessary).

Ron Shamir, in a lecture handout entitled “Algorithms for Molecular Biologv”, Lecture 7, Tel Aviv University, dated “Fall Semester 2001”, discusses general concepts and algorithms relating to gene finding. An earlier version of the lecture handout is available on the Internet website:

-   http://www.math.tau.ac.il/˜rshamir/algmb98/algmb98.html.

Rainer Sprang and Martin Vingron, in a paper entitled “Statistics of Large-Scale Sequence Searching”, published in Bioinformatics, Volume 14, No. 3, 1998, pp 279-284, discuss the statistical significance of scores in the context of a database search.

Samuel Karlin and Stephen F. Altschul, in a paper entitled “Methods for assessing the statistical significance of molecular sequence features by using general scoring schemes”, Proceedings of the National Academy of Science (USA), March 1990, Volume 87, pp. 2264-2268, present a theory that provides precise numerical formulas for assessing the statistical significance of any region in a sequence with a high aggregate score. The object is to identify whether particular sequence patterns occur simply by chance.

In another paper entitled “Applications and statistics for multiple high-scoring segments in molecular sequences”, Proceedings of the National Academy of Science (USA), June 1993, Volume 90, pp. 5873-5877, Samuel Karlin and Stephen F. Altschul discuss score-based measures of molecular sequence features as an aid in the study of proteins and DNA. In particular, the paper discusses potential problems encountered when using score-based techniques to identify similar sequences.

In a paper entitled “Statistical Significance of Probabilistic Sequence Alignment and Related Local Hidden Markov Models” and published in the Journal of Computational Biology, Vol. 8, No. 3, 2001, pp 249-282, Yi-Kuo Yu and Terence Hwa propose a modified “semi-probabilistic” alignment consisting of a hybrid of the Smith-Waterman alignment. Specifically, the proposed method uses Hidden Markov Models to predict coding regions, rather than automaton's, profiles and scores for matching.

SUMMARY

Aspects of the present invention provide a method, a system and a computer program product for identifying occurrences of a sequence of ordered marker strings in a string are disclosed. The method includes the steps of identifying sub-strings in the string that match the marker string, creating directed links between a sub-string that matches a particular marker string and all the sub-strings that match a subsequent marker string in the ordered sequence of marker strings, and identifying occurrences of the sequence in the string by tracing one or more corresponding paths from each sub-string that matches the first marker string to all sub-strings that match the last marker string by following the directed links.

Further aspects of the present invention provide a method, a system and a computer program product for finding a gene in a DNA sequence. The method includes the steps of identifying sub-strings in the DNA sequence that match a marker string, recording, in a set ordered according to the occurrence of the marker strings in the gene, the score and position of each sub-string whose score satisfies a matching constraint, creating directed links between each recorded sub-string that matches the marker string and any recorded sub-strings that match the subsequent marker string in the ordered sequence of marker strings subject to the directed links satisfying an inter-marker length constraint, and tracing all paths that connect each recorded sub-string that matches the first marker string in the ordered set of marker strings to a recorded sub-string that matches the last marker string in the ordered set of marker strings using the directed links, wherein the paths satisfy a sequence length constraint.

The step of identifying sub-strings in the DNA sequence that match a marker string preferably include the sub-steps of generating a score representative of the degree of match between a marker string and a sub-string of the DNA sequence using a profile corresponding to the marker string, and identifying the match subject to the score satisfying a predetermined constraint. The profile can be representative of a set of strings that are considered matches of the marker string and/or a set of strings that are considered mismatches of the marker string.

The directed links preferably satisfy an inter-marker length constraint that comprises one of a minimum number of characters between sub-strings that match successive marker strings in the DNA sequence, a maximum number of characters between sub-strings that match successive marker strings in the DNA sequence, and a predetermined number of characters between sub-strings that match successive marker strings in the DNA sequence.

The step of tracing all paths that connect each recorded sub-string that matches the first marker string in the ordered set of marker strings to a recorded sub-string that matches the last marker string in the ordered set of marker strings preferably includes the sub-steps of selecting a sub-string corresponding to a marker string, tracing all possible forward paths from each occurrence of the sub-string to all sub-strings that match the first marker string, tracing all possible backward paths from each occurrence of the sub-string to all sub-strings that match the last marker string, and building complete paths between sub-strings that match the first marker string and sub-strings that match the last marker string, wherein the complete paths comprise the forward paths and the backward paths. Furthermore, the step of building complete paths preferably includes the sub-steps of individually de-normalizing path information relating to the forward and backward paths.

Preferably, the complete paths satisfy a sequence length constraint that comprises one of a minimum number of characters, a maximum number of characters and a predetermined number of characters.

Further, preferably, the sum of the scores of the sub-strings comprising each complete path is within a predetermined tolerance of a desired path score, the desired path score comprising the sum of the highest scores recorded in respect of each marker string.

BRIEF DESCRIPTION OF THE DRAWINGS

Features and preferred embodiments of the present invention are described hereinafter, by way of example only, with reference to the accompanying drawings in which:

FIG. 1A is a diagrammatic representation of the general problem;

FIG. 1B is a diagrammatic representation showing sequence sets identified according to an embodiment of the present invention;

FIG. 2 is a flowchart of an algorithm for solving the general problem, according to an embodiment of the present invention;

FIG. 3 is a flowchart that provides additional detail of step 210 of FIG. 2;

FIG. 4 is a flowchart that provides additional detail of step 220 of FIG. 2;

FIG. 5 is a flowchart that provides additional detail of step 230 of FIG. 2;

FIG. 6 is a flowchart that provides additional detail of step 515 of FIG. 5;

FIG. 7 is a flowchart that provides additional detail of step 640 of FIG. 6;

FIG. 8 is a flowchart for building complete paths from the Forward Global Path Array (FGPA);

FIG. 9 is a flowchart that provides additional detail of step 825 of FIG. 8 and step 1125 of FIG. 11;

FIG. 10 is a flowchart that provides additional detail of step 840 of FIG. 8;

FIG. 11 is a flowchart for building complete paths from the Backward Global Path Array (BGPA);

FIG. 12 is a flowchart that provides additional detail of step 1140 of FIG. 11;

FIG. 13 is a flowchart of a method for a matching process according to an embodiment of the present invention; and

FIG. 14 is a block diagram of a computer system suitable for performing the methods and/or techniques of embodiments of the present invention, as described hereinafter.

DETAILED DESCRIPTION

A method, a system and a computer program product have been described for for identifying one or more occurrences of a sequence of ordered marker strings in a string. The preferred method, computer system and computer program product are described with specific reference to “the gene finding problem”. However, it is not intended that the present invention be so limited as the principles thereof have general applicability to numerous fields and applications. For example, the present invention has application to the protein matching problem, wherein the set <G> corresponds to protein domains and the target string S comprises a protein database. Alternatively, the set <G> corresponds to protein domains and the target string S comprises a newly sequenced protein whose function/similarity/homology is required. Other applications include but are not limited to:

-   -   the creation of reliable document signatures in the field of         Natural Language Processing/Machine Learning;     -   the creation of adaptive human machine interfaces in the field         of machine intelligence to construct systems that can work in         noisy environments and with incomplete and/or incoherent data         (e.g. a system to help patients in shock or extremely senile         persons, etc.); and     -   adaptive machine vision systems to enable systems to identify         objects whose features evolve or change (not dramatically) with         time.         A Statement of the General Problem         Given:     -   a string S of length γ, belonging to the alphabet Σ;     -   an ordered set M of marker strings, each of length l_(i) and         belonging to the alphabet Σ′⊂Σ such that m_(i), m_(j)εM (i<j         implies that end m_(i)<start of m_(j));     -   an ordered set P of profiles, wherein:         -   each profile p_(i)εP is a l_(i)×k_(i) matrix,         -   p_(i) corresponds to m_(i) of set M,         -   k_(i) is the length of m_(i), and         -   l_(i) is the number of elements in Σ′_(i);     -   an ordered set S_(w) of normalized scores wherein:         -   each s_(i)εS_(w), corresponds to m_(i)εM;     -   an automaton, which can recognize all the words in the language         formed by {Σ, Gr}, wherein Gr comprises a grammar corresponding         to the alphabet Σ;     -   a global sequence length L;     -   a global inter-m_(i) length α and tolerance level T, (0<T<l),         defining the range of similarity to be addressed.         Referring now to FIG. 1A, the problem can be stated as follows:

Find sequences <G> 120 in string S 110 such that all m_(i) 112, 114 . . . 116εM occur in the order they had been in the set M, such that the following constraints are satisfied:

A. Inter-Marker Length Constraint

-   -   1. Length between the strings m_(i), m_(i+1) is less than α 130,         or     -   2. Length between the strings m_(i), m_(i+1) is equal to α 130,         or     -   3. Length between the strings m_(i), m_(i+1) is greater than α         130.

B. Sequence Length Constraint

-   -   1. Length of G 120 is less than L 140; or     -   2. Length of G 120 is equal to L 140; or     -   3. Length of G 120 is greater than L 140.

The resultant sequences <G> should be positive samples and should be found within an acceptable response time. The choice of inequality for each of constraints A and B is determined by the target application.

Assumptions made in the input data sets are as follows:

1. The language formed by {Σ, Gr} may contain synonyms;

2. The string S may contain insertions, deletions and substitutions of any length, which can occur anywhere and any number of times.

The Gene Finding Problem

In the gene finding problem described hereinbefore, the string S corresponds to a DNA sequence. The coding region for a gene is preceded by certain other regions called initiators and promoters, which play an important role in the identification of the coding region and in the expression of the gene. The end of a coding region is also indicated by a sequence made of terminating codons. Within the coding region, the introns and exons alternate. All these regions, in their order of occurrence, form the set M of marker strings.

Mutations and environmental factors can cause a coding region to be coded in more than one form. The various possible codes that exist and the distribution thereof can be determined by analyzing a large number of samples. This information can be represented in the form of a matrix of sequence logos or elements similar to sequence logos. The profiles P correspond to these matrices.

The function provided by a protein depends on the structure of that protein, which is dependent on the amino acid sequence, which is determined by the sequence of nucleotides (the gene sequence). More than one gene sequence can code for a single function. It is believed that if there is a 30% similarity in two sequences, that there would be significant similarity in their structure and function. Sequences can be categorized based on the similarity of the function that they provide. Comparison between sequences can be performed using a matching function that statistically determines a match/mismatch score. All sequences that have a match/mismatch score above/below the determined score can be declared to belong to a particular category. The set S_(w) of weights corresponds to these scores.

An amino acid can be coded by more than one codon. Thus, synonyms exit and an automaton can be used to recognize such in order to take them into account.

A genome is spread over chromosomes. Each chromosome is responsible for the expression of certain mgenes and hence certain funtions. Gene coding regions do not cross chromosome boundaries and a coding region's length is constrained by the fact that a longer coding region is relatively more susceptible to a large number of mutations and errors can be introduced during replication, etc. Thus, by examining a large number of genes, one can arrive at a length within which all the coding regions' lengths lie. This is the global sequence length parameter L.

Similar restrictions apply for coding regions in that an exon for a gene cannot be found in another chromosome, nor can an exon for a gene cross the terminating region (an exon that crosses a terminating region doesn't belong to the gene). Thus, similarly to the gene sequence length, an inter-exon (promoter-initiator, initiator-exon exon-exon, exon-terminating sequence) length can be determined. This is referred to as α.

The DNA is a large chunk of information that usually contains repetitious regions. It has been observed that only a part of the DNA codes for genes, thus creating the possibility of obtaining matches to random sequences. This could sometimes undermine the choice of genuine sequences that may not score higher than such random sequences. In order to minimize these effects, a tolerance level T is created and all those sequences that fall within the tolerance level are considered. The choice of the tolerance level T determines the number of elements in the final result set.

An Outline of a Solution to the General Problem

The solution comprises three main steps, namely:

-   -   STEP A: Locate the matching segments m_(i) in S,     -   STEP B: Identify all the possible sequence sets, and     -   STEP C: Identify the optimal sequence set.

FIG. 2 is a flowchart of an algorithm of a solution to the general problem, wherein step 210 corresponds to STEP A, step 220 corresponds to STEP B and step 230 corresponds to STEP C.

At step 210, all sub-sequences occurring in the target string S that match the marker strings m_(i)εM, are found using the profiles p_(i). The matching sub-sequences are required to satisfy a constraint that their mismatch score is less than s_(i) or that their match score is greater than s_(i), The position of occurrence and score of each match is recorded in the set V_(i), which is ordered on the position of occurrence of the matching sub-sequences in S. FIG. 1B shows an example comprising sets V₁ to V₄ containing information relating to the ordered positions of occurrence of matches of the marker strings m₁ to m₄, respectively. For example, matches for marker string m₁ occur at positions 4, 10, 17, 34, 50, 70, 77 and 86 in string S.

If no matches are found for a marker string m_(i) at step 215, non-existence of the sub-sequence is announced at step 245 and the algorithm is terminated at step 250.

At step 220, all possible sequence sets are located. Directed links (arcs) are created between elements in V_(i) and V_(i+1), such that inter-marker length constraint and the condition that v_(i).end<v_(j).start (where v_(i)εV_(i) and v_(j)εV_(i+1)) are satisfied. Step 220 is performed for each V_(i) generated in step 210, except for V_(ζ) corresponding to string m_(ζ), where m_(ζ) is the marker string occurring last in the ordered set M. Step 220 results in a graph Ω that has multiple source and sink points. The example in FIG. 1B shows directed links 161 to 165 between elements in V₁ and V₂, directed links 171 to 174 between elements in V₂ and V₃ and directed links 181 to 185 between elements in V₃ and V₄. As can be seen, the constraint that v_(i).end<v_(j).start (i<j) is satisfied for each directed link.

If no links can be created for any V_(i), V_(i+1)at step 225 (where l<i<ζ and ζ is the number of elements in M), non-existence of the sequence is announced at step 245 and the algorithm is terminated at step 250.

At step 230, all paths that connect an element v₁ in V₁ to an element v in V_(ζ) (where V_(ζ) is the matching set for the last marker m_(ζ) in M), such that all the paths from the graph Ω satisfy a sequence length constraint and their score is within a tolerance level T of the expected best path's score, are identified. The pair (v₁, v_(ζ)) represents an instance of the sequence G on the string S. Referring to the example in FIG. 1B, paths that connect an element in V₁ to an element in V₄ include directed links {161, 172, 181}, {161, 172, 182}, {164, 173, 183}, {164, 173, 184} and {164, 173, 185}.

If any paths exist that satisfy both the sequence length and tolerance constraints, and no more such paths can be found, at step 235, the paths are returned as <G> (existences of the sequence G on the string S) at step 240 and the algorithm is terminated at step 250.

If no such paths exist, at step 235, non-existence of the sequence is announced at step 245 and the algorithm is terminated at step 250.

A Detailed Solution of the General Problem

This section provides additional detail relating to the steps of the foregoing outline of a solution to the general problem.

STEP A: Locate the Matching Segments m_(i) in S

For each string m_(i)εM, matches on the target string S are identified, Starting with S₀ and comparing S₀ . . . S_(k−1) (where k=1), the profile information p_(i) is used in the matching process to allow substitutions. Matching continues with S₁ . . . S_(k) upto S_(γ−k−1) . . . S_(γ). During matching, a holistic/polynomial function is used to give a match/mismatch score for each match that is generated, so that the matches can be ranked based on closeness to the target string. The starting position and score of each match are recorded in an ordered set V such that, for all v_(i),v_(j)εV, v_(i)i.start<v_(j).start (i<j). If vs_(max) denotes the score of the highest scoring element(s) in V, any elements added to the set V should have a match score of greater than vs_(max)*(1−T). Alternatively, if vs_(min) denotes the score of the lowest scoring element(s) in V, any elements added to the set V should have a mismatch score of less than vs_(max)*(1+T). The foregoing condition is called the set existence condition. If vs_(max) changes when an element is added, all elements that do not satisfy the set existence condition are removed from the set V, either when the change occurs or at the end of the matching process. If V is empty when matching for a mi is complete, the required sequence G does not exist and the algorithm is terminated.

FIG. 3 is a flowchart of a process to find segments or sub-strings of the string S that match any of the marker strings M. FIG. 3 thus provides additional detail of step 210 of FIG. 2.

The string S, the set of marker strings M, the set of profiles P (corresponding to the set of marker strings M), the set of weights S_(w) and a tolerance value T, are inputs at step 310.

Matching is performed for each marker string mi using the loop variable i, which is initialized at step 315, tested at step 320 and incremented at step 325. Variables relating to a specific marker string are initialized at step 325.

The variable x, which is initialized at step 325, tested at step 330 and incremented at step 345, is used to select each subsequent sub-string from string S for matching against a current marker string m_(i).

If a further sub-string of S that corresponds in length to the current marker string m_(i) exists, at step 330, the sub-string is selected at step 345. At step 350, a matching score is determined for the sub-string selected in step 345 against the current marker string m_(i).

Step 355 tests whether the score determined in step 355 is at least equal to an expected weighted score and is within a specified tolerance of the previous maximum score for set V_(i) (i.e. vs_(max)*(1−T)). If so, the score is added to the ordered set V_(i) at step 360. If not, processing returns to step 330.

Step 365 determines whether the score determined in step 355 is at least equal to the expected weighted score and is higher than the current maximum score for set V_(i). If so, the current score is stored as the maximum score at step 370. Processing then returns to step 330.

If no further sub-strings of S that correspond in length to the current marker string m_(i) exist, at step 330, then entries in the set V_(i) whose score is not within the specified tolerance of the maximum score for set V_(i) (i.e. vs_(max)*(1−T)) are removed, at step 335. If the set V_(i) is empty, at step 340, it is output that the required sequence was not found and the process terminates at step 385. If there are additional elements in the set V_(i), processing returns to step 320.

Once the string S has been searched for sub-strings corresponding to each of the marker strings m_(i), the sets V_(i) are output at step 375 and the process terminates at step 385.

Table 1, hereinafter, contains pseudo-code for a process to find segments or sub-strings of the string S that match any of the marker strings M. TABLE 1 For each m_(i) ε M Initialize vs_(imax) with 0, since the match score is of interest l_(i), = length(m_(i)) p = p_(i) For x = 0 to γ - l_(i) SS = S_(x)S_(x+1) . . . S_(x+li−1) score = match(m, SS, p), /* a string matching function that returns the similarity between strings a & b, based on the profile information p */ If score ≧ s_(i) and vs_(imax) *(1−T) < score then Add <x,score> to V_(i) If score ≧ s_(i) and score > vs_(imax) then vs_(imax) = score End For /* For x = 0 to γ - l_(l)*/ For each v_(i) ε V_(i) If vs_(imax) *(1−T) > v_(i).score then Remove v_(i) from V_(i) End For If V_(i) = { } then Return failure Add V_(i) to V End For /* For each m_(i) ε M*/

It should be noted that both FIG. 3 and Table 1 make use of a ‘match score’, as opposed to a ‘mismatch score’. Appropriate changes will need to be made for the case of a ‘mismatch score’, as will be understood by an appropriately skilled person.

STEP B: Identify all the possible Sequence Sets.

The output from STEP A comprises the ordered sets V₁, V₂ . . . V_(m), where m is number of elements in M. Accordingly, V_(i) denotes the ordered set V corresponding to the marker string m_(i) and V_(ζ) denotes the ordered set V for the last marker string (m_(ζ)) of the ordered set M.

Directed links (arcs) are created between all elements in V_(i) and V_(i+1) that satisfy an inter-marker length constraint and the condition that v_(i).end<v_(j).start (where v_(i)εV_(i) and v_(i)εV_(i+1)). If there exists any set V_(i) except V_(ζ), with a zero arc count, the algorithm is terminated. This condition occurs when no sequence with elements of M occurring in that order exists in S.

The output of STEP B provides a graph Ω populated with nodes and edges that represents all the possible sequence sets. The graph Ω is a layered graph, with each layer representing an element in the marker set M.

FIG. 4 is a flowchart of a process to identify all the possible sequence sets of sub-strings in string S that match marker strings m_(i). FIG. 4 provides additional detail of step 220 of FIG. 2.

The process is performed for each pair of adjacent sets V_(i) and V_(i+1) using the loop variables i and k, respectively. The loop variable i is initialized at step 410, tested at step 415 and incremented at step 435.

At step 420, sets V_(i) and V_(i+1) are selected, a counter (edgecount) is initialized for counting the number of edges or directed links and the number of elements in sets V_(i) and V_(i+1) are determined.

If all the elements of the set V₁ have been processed, at step 425, the loop variable i is incremented at step 430 and processing returns to step 415. If, on the other hand, more elements of the set V_(i) are still to be processed, at step 425, the loop variable i is incremented and another loop variable k is initialized to zero at step 435.

If the loop variable k is equal to the number of elements in set V_(i+1) (i.e. processing of set V_(i) is complete) and the edgecount value for set V_(i) is zero, at step 445, processing returns to step 425. If the edgecount value for set V_(i) is not zero, at step 445, it is output that no required sequences were found at step 470 and the process terminates at step 475. If the loop variable k is less than the number of elements in set V_(i+1), at step 440, the loop variable k is incremented and the difference in position between the k^(th) element in set V_(i+1) and the ith element in the set V_(i) (in the string S) is determined and stored in the variable tvar, at step 450.

If the value of tvar satisfies the inter-marker length constraint and the start position of the element in set Vi+1 is after the end position of the element in set Vi, at step 455, an edge e is created that joins the i^(th) element in V_(i) and the k^(th) element in V_(i+1), at step 460. The weight of edge e is set to the sum of the scores of the i^(th) element in V_(i) and the k^(th) element in V_(i+1)and the edgecount variable is incremented, also at step 460. Processing then continues at step 440.

Once each set V_(i), except for the last set V_(ζ), has been processed to determine the presence of directed links to set V_(i+1), at step 415, the sequence sets are output at step 465 and the process terminates at step 475.

Table 2, hereinafter, contains pseudo-code for a process to identify all the possible sequence sets. TABLE 2 For each V_(i) except for V_(ζ) Let cV = V_(i) Let nV = V_(i+1) For each element v_(i) of cV For each element v_(j) of nV if v_(j).start - v_(i) end satisfies Mean inter-marker length constraint and v_(i).end < v_(j).start then Create an directed arc e joining v_(i) and v_(j) in Ω weight(e) = v_(i).score + v_(j).score Add One to the arc count of ordered set V_(l) End If End For End For STEP C: Identify the Optimal Sequence Set.

The input to STEP C is a graph Ω that represents all possible sequences and the output of STEP C is the optimal sequence set <G>.

FIG. 5 is a flowchart of a process to identify the optimal sequence set of sub-strings in string S that match marker strings m_(i). FIG. 5 thus provides additional detail of step 230 of FIG. 2.

At step 510, the starting point X in the graph Ω is located. The layer containing the starting point X in the graph Ω is designated the sinklayer V_(s).

The following heuristics can be applied to locating the starting point X in the graph Ω:

-   -   Select the set V_(i), which has the lowest arc count. If there         exists more than one such set then compare the neighboring sets         of each such set (V_(i−1),V_(i+1)) and take the set whose         neighboring set has the lowest edge count among the sets         considered. If a choice cannot be made, take any random V_(i)         among the V_(i) 3 s.     -   Select the last set V_(ζ)     -   Among the V sets, select the set that has minimum number of         v_(i)'s that are connected by an edge from the neighboring two         sets. This method is much more involved but is guaranteed to         produce better or equivalent results compared to the above two         methods.

The paths from the sinklayer V_(s) to the first layer V₁ of the graph Ω are traced at step 515. For each element v_(i) of the sinklayer V_(s) with at least one edge, paths that connect an element from the set in the sinklayer V_(s) to an element in V₁, are traced. The sinklayer divides the match-ordered sets into two classes, one of which contains all the match-ordered sets V₁ through V_(s) and the other of which contains all the match-ordered sets V_(s) through V_(ζ). The output of this process is an array of nodes (the Forward Global Path Array) that form the forward path. The first element is from V₁, the second from V₂, . . . , and the last from V_(s). If no paths are identified at step 525, it is output that the required sequence has not been found at step 550 and the process terminates at step 555.

The paths from the sinklayer V_(s) to the last layer V_(ζ) of the graph Ω are traced at step 520. A modified version of the process described hereinbefore for step 515 is applied to the other set V_(s) to V_(ζ), to generate a Backward Global Path Array. If no paths are identified at step 530, it is output that the required sequence has not been found at step 550 and the process terminates at step 555.

At step 535, the identified paths are merged (i.e., the Forward and Backward Global Path Arrays are combined) and subjected to sequence length and tolerance constraints to determine the optimal sequence set. The tolerance constraint requires that the score of a merged path is within an acceptable tolerance limit of the expected best path score. Any paths found that satisfy both constraints (tested at step 540) are output as required sequences at step 545, after which the process terminates at step 555. If no paths satisfy both of the constraints (tested at step 540), it is output that the required sequence has not been found at step 550, after which the process terminates at step 555.

Tracing a Path

A TracePathThread thread is created for each edge of the nodes in the sinklayer to trace a path. The thread is created with the following input state:

-   -   direction (set as forward),     -   nextNodeIndex: The index of node from which the edge originates         (next-node),     -   nextNodeMatchOrderedSetNumber: The next node's match-ordered set         number,     -   nodeIndex: The input node's index,     -   matchOrderedSetNumber: The input-node's match-ordered set number     -   arrayOfInputNodes: An array with the input-node's index as the         first element and all the elements from the input array of nodes         in the order they have occurred in that input array. Note that         this will be empty for each element in the sinklayer.

The output produced by the thread is the (direction) Global Path Array. The structure of each element in the array is as follows:

-   -   nextNodeIndex: The next-node index,     -   nextNodeMatchOrderedSetNumber: The next-node's         match-ordered-set-number,     -   nodeIndex: The current-node index,     -   matchOrderedSetNumber: The current-node's match ordered set         number, and     -   arrayofInputNodes: An array that contains indices of nodes that         have been encountered upto the current node with the last node         encountered as the first element.

Pseudo-code for the TracePathThread algorithm for constructing the Forward Global Path Array is contained in Table 4, hereinafter. TABLE 4 TracePaththread : Each thread works in the following manner: 1) Read the node that has been input, call this input-node The node from which the thread was created is called ‘CurrentElement’ 2) If the node has not been read by another thread Then 2.a) Set the node-read indicator on /*to block the node from other threads*/ Add inputNodeIndex to ArrayOfInputNodes 2.b) For each out going edge (except one), create a TracePathThread thread to trace n−1 branches of the path. For the current path, add that node as the first element to the input array of nodes. Set input node value to next-node's value and input MatchOrderedSetNumber is updated to the next-node's match-ordered set number. 2.b) Continue with Step 1. Else 2.a) If the input-node belongs to target layer (V₁) Then (there would be no outgoing edges) Add the input-node as the first element to the array of input nodes. Make an entry in the Forward global path array with null for input-node's index, 0 for input node's MatchOrderedSetNumber and the input-node's index, input node's MatchOrderedSetNumber, ArrayOfInputNodes Exit Else (The input-node has been read) Make an entry in the Forward global path array with the input-node's index, input-node's match-ordered set number, CurrentElement's index, CurrentElement's MatchOrderedSetNumber and the ArrayOfInputNodes Exit.

FIGS. 6 and 7 show additional detail of a process for tracing paths from the sinklayer V_(s) to the first layer V₁ of the graph Ω (step 515 of FIG. 5).

At step 610, the input node IN and the node from which the thread originates (the current element) CE are read. At step 615, it is determined whether the input node IN has been read by another thread or whether the input node IN belongs to V₁. If not (N), processing continues at step 640, which is presented in further detail in FIG. 6B. If yes (Y) and the input node IN does not belong to V₁ (N), at step 620, an entry is made in the Forward Global Path Array (FGPA) at step 625. If yes (Y) and the input node IN does belong to V₁ (Y), at step 620, an entry is made in the FGPA at step 630. The process ends when an entry is made in the FGPA.

The entry made in the FGPA at step 625 includes the input node's index and match-ordered set number, the current element's index and match-ordered set number and the array of input nodes. Alternatively, the entry made in the FGPA at step 630 includes a null for the input node's index, zero for the input node's match-ordered set number, the current element's index and match-ordered set number and the array of input nodes.

FIG. 6B shows more detail of step 640 in FIG. 6A. At step 650, the node IN is set as having been read and some internal variables are initialized.

Step 655 ensures that each incoming node to node IN is processed at step 660, by comparing a loop variable i to the number of incoming nodes elc. When the last incoming node been processed (N), (i.e., i=elc−1), processing continues at step 665.

For each incoming node, at step 660, the incoming node is added as the first element to the array of incoming nodes and a new TracePathThread is created using three input parameters: the intermediate target node n, the intermediate source node ce and the array of nodes encountered from the source node to the intermediate source node. The array of nodes encountered from the source node to the intermediate source node corresponds to the array of input nodes from the previous stage. The next incoming node is selected using loop variable by incrementing loop variable i and processing continues at step 655.

When all the incoming nodes to node IN (elements of ‘es’) have been processed (N), at step 655, the input node IN is added as the first element to the array of incoming nodes and the current element CE is set to the input node IN at step 665. Then, also at step 665, the input node IN is set to the node ‘n’ from which the edge or link ‘e’ (i.e., the last element of ‘es’) originates. At step 670, the input node IN is output to the next stage of the process (i.e., step 615), which requires the variable IN as an input.

A similar process to that of FIGS. 6 and 7 can be performed to trace paths between the sinklayer V_(s) and the last layer V_(ζ) of the graph Ω (step 520 of FIG. 5), as will be understood by an appropriately skilled person. In this case, the target set is V_(ζ) and the array produced is the Backward Global Path Array.

Building Complete Paths from the Forward and Backward Global Path Arrays

The Global Path Arrays contain the path information in a normalized form. An element of a Global Path Array contains a part of the path information and depends on other elements for the complete path. For example, an element may contain ‘A-a-b-c’, where ‘A’ denotes a reference to another element in the Global Path Array, which may contain ‘d-e-f’. Complete path information ‘d-e-f-a-b-c’ can be extracted by substituting the relevant cross-references. Hence, complete paths are built by individually de-normalizing the Forward Global Path Array and the Backward Global Path Array.

FIG. 8 is a flowchart of a process to build complete paths in the forward direction, which provides additional detail of step 515 of FIG. 5. The output of this process is used by step 535 of FIG. 5.

The Forward Global Path Array (FGPA) is retrieved at step 810 and sorted in ascending order of the current node's match-ordered set number at step 815. Various internal variables are initialized at step 820, including setting the set Oterms to empty and the previous layer (Prev_s) to 1.

All the complete paths are processed at step 825, additional detail of which is provided in FIG. 9 and the accompanying description.

Step 830 ensures that each element in the FGPA is processed using the loop variable i. If there are still elements of the FGPA to be processed and the set Oterms is not empty (N), at step 830, the set Tterms is re-initialized to empty and the previous layer (Prev_s) is re-initialized to 1 at step 835 (for processing of the next element of the FGPA). Complete paths are built by de-normalizing the path information contained in the rest of the elements of the FGPA at step 840. Additional detail regarding step 840 is provided in FIG. 9. Then, the FGPA is output at step 845. All elements in the FGPA have complete paths from the source node (an element in the layer V_(i)) to the target node (an element in V₁) in their array of input nodes.

When the FGPA is processed, all the elements of the FGPA that do not belong to a path from the source layer (V_(i)) to target layer (V₁) are removed. Thus all existing/remaining elements will defme a path from the source layer to the target layer. The nodes in each layer, including the target and source layer that form the path, are arranged in an array variable containing the input nodes for each remaining element. The first element in the array of input nodes entry is the node in the target layer, the second element is the node in the subsequent layer, and so on. The last entry is the node in the source layer. Hence, this information provides the complete path information.

Alternatively, if all the elements of the FGPA have been processed or the set Oterms is empty (Y), at step 830, the FGPA is output directly at step 845.

FIG. 9 is a flowchart for processing all complete forward paths and corresponds to step 825 of FIG. 8.

Processing variables including the FGPA, the number of elements in the FGPA, the match-ordered set number of the target layer (Prev_s), and the set Oterms are loaded and/or initialized at step 910. Oterms is a global variable that contains information for efficient construction of paths without considering those nodes in the graph that do not terminate at a node in the target layer. Thus, only nodes that belong to a path that terminates at a node in the target layer appear in the Oterms set.

At step 920, it is determined whether all the elements of the FGPA have been processed using the loop variable i. At step 930, a current element of the FGPA is selected.

Then, at step 940, it is determined whether the current element belongs to the target set, which is provided in the variable Prev_s. If so (Y), the element's index in its match-ordered set, which would be used by an entry in the following layer to point to as next node, is added to the Oterms set at step 950. Thereafter, the loop variable i is incremented and processing continues at step 920. All entries belonging to the target set have complete path information in their array of input nodes.

If the current element does not belong to the target set (N), at step 940, or all of the elements of the GPA have been processed (N), at step 920, the processed GPA and associated variables are output or made available to a further processing step at step 960.

FIG. 10 is a flowchart of a process for de-normnalizing the Forward Global Path Array and corresponds to step 840 of FIG. 8.

Referring to FIG. 10, the FGPA, the number of elements in the FGPA, the starting position for processing in the Forward Global Path Array (FGPA), the number of the layer previously processed (Prev_s) and the nodes in the current layer which form part of a complete path, are loaded at step 1010. The nodes forming part of a complete path are obtained from the sinklayer Oterms. If no complete paths to the previous layer exist, then no paths from the sinklayer to the previous layer via the current layer can exist In this case, the FGPA would not contain any entries for Prev s and Oterms would be empty.

If Oterms is empty, no paths pass through or terminate at the Prev_s layer since any threads terminating at the Prev_s+1 layer would use the Prev_s layer's nodes, which have paths to the target layer to reach the target node. Thus, if no such nodeS exist in the Prev_s layer, no paths exist from the Prev_s+1 and subsequent layers to the target layer. Accordingly, it is determined at step 1020 whether Oterms is empty. If so (Y), the FGPA is output at step 1080 and processing continues at step 845 of FIG. 8. Alternatively (N), it is determined at step 1030 whether all the elements of the FGPA have been processed, using the loop variable i. If so (N), the FGPA is output at step 1080 and processing continues at step 845 of FIG. 8.

If there are further elements of the FPGA to be processed (Y), at step 1030, internal variables are initialized at step 1040. Then, at step 1050, it is determined whether the next node of the current element of the FGPA being processed is present in Oterms. If so (Y), it is implied that a path exists between the current element of the FGPA and the previous layer (Prev_s), via the next node, and the current element's input node is noted (i.e., the node's index is added to Tterms) at step 1070. This enables nodes in the Prev_s+1 layer that have the current element as their next node, to be processed.

Each element of the FGPA with next node as input node contains path information relating to the path from the element to to the target set in the array of input nodes. That information, together with information contained in the current element's array of input nodes, is used to find a path from the sinklayer to the target layer that passes through the current element's input node and next node. The nodes that have to be visited on a path from the current element to an element in the target layer are given by Prev_s, thus, the first Prev_s elements of the matching element are prefixed to the current element's input array of nodes. Hence, complete path information is obtained.

Steps 1071 to 1079 search the entire FGPA for all elements whose next node is an input node. Step 1073 checks for elements whose input nodes match the current element's next node. Step 1077 finds the Prev_s elements from the matched element's array of input nodes and adds those elements to the current element's array of input nodes. Since more than one path via a node can exist, steps 1074, 1075 and 1076 create elements for each path so that no information is lost. Step 1076 reuses the current element if only one path exists or if the current element corresponds to the last path through the node.

When all the elements in the FGPA have been searched relative to a current element (N), at step 1071, a new current element is selected. Step 1060 removes the superceded current element from the GPA to prevent that element being considered during further processing. Step 1061 updates the loop variable i to keep track of the elements still to be searched.

Returning to step 1050, if the next node of the current element is not contained in Oterms (N), it implies that no path exists from the current element to the target node. Accordingly, the next node is selected at step 1061.

At step 1062, it is determined whether the next element belongs to the same match-ordered set. If so (Y), processing returns to step 1030. Alternatively (N), Oterms is updated to include those elements in the current match-ordered set that form part of a path, at step 1063. Prev_s is also updated to the current element's match-ordered set number, at step 1063, so that the number of elements taken to complete the path is correct. The next entry will belong to the Prev_s or Prev_s+1match-ordered set since the FGPA is sorted in ascending order of the match-ordered set number of the elements.

When either Oterms becomes empty (Y, at step 1020) or all the elements in the FGPA have been processed (N, at step 1030), the processed FGPA is output at step 1080. Each element in the FGPA with length of array of input nodes equal to the distance between the sink layer and the target layer indicates a complete forward path (e.g. if there are 3 intermediate layers between the sinklayer and the target layer, an entry containing 5 elements in the array of input nodes comprises information relating to a complete path).

A pseudo-code algorithm for de-normalizing the Forward Global Path Array is provided hereinafter in Table 5. TABLE 5 Sort the Forward Global Path Array in ascending order of matchOrderedSetNumber FGPA_L = number of elements in Forward Global Path Array For each entry in Forward Global Path Array with matchOrderedSetNumber equal to source node (V₁) matchOrderedSetNumber Add entry.nodelndex to Oterms End-for If Oterms is a Null-Set then Exit /* No path exist from target (Sink Layer) to the source */ /* The iterator will point to the ‘n^(th)’ element in the Forward Global Path Array */ /* For the remaining (FGPA_L - n) entries in the Forward Global Path Array*/ Prev_s = matchOrderedSetNumber of the (n+1)^(th) entry in the Global Path Array Tterms = { } For the remaining (FGPA_L-n) entry (cur_e) in the Forward Global Path Array If the cur_e.nextNodeIndex is IN Oterms then For each entry e1 in the Forward Global Path Array with cur_e.nextNodeIndex = e1.nodeIndex /* insert in the beginning of cur_e.arrayOfInputNodes, with the first Prev_s elements from the e1.arrayOfInputNodes */ numNodeElem = number of elements in e1.arrayOfInputNodes If e1 is the last such entry in Forward Global Path Array then Temp = cur_e else Temp = copy of cur_e End-if Temp.nextNode index = −1 For k = Prev_s − 1 to 0 insert e1.arrayOfInputNodes [k] to the beginning of Temp.arrayOfInputNodes End for Add Temp to end of Forward Global Path Array End-for Add cur_e.current-node index to Tterms Else/* if cur_e.next-node index does not exist in Oterms*/ Remove cur_e entry from the Forward Global Path Array End-if If Prev_s != cur_e's next entries.matchOrderedSetNumber then Prev_s = cur_e.matchOrderedSetNumber Oterms=Tterms If Oterms = { } then Exit End-if End-for

FIG. 11 is a flowchart of a process to build complete paths in the backward direction, which provides further detail of step 520 of FIG. 5. The output of this process is used by step 535 of FIG. 5. An appropriately skilled addressee will readily recognize that the method in the backward direction is similar to that in the forward direction (i.e., FIG. 8). Additional deail of step 1125 of FIG. 11 is provided in FIG. 9, which applies to both the forward and backward directions. Additional detail of step 1140 of FIG. 11 is provided in FIG. 12, which is a flowchart of a process for de-normalizing the Backward Global Path Array. Once again, the method for de-normalization in the backward direction is similar to that for the forward direction and the skilled addressee is referred to the description relating to FIG. 10. The differences between the forward and backward directions primarily relate to the GPA and Prev_s, as follows:

-   -   The Backward Global Path Array (BGPA) is sorted in descending         order of the match-ordered set number of the entries     -   Prev_s is decremented by 1 each time since the next entry's         match-order set number can only decrease     -   The last Prev_s entries of the arrayOfInputNodes of the entry         whose input node matches the current entry's next node is added         to the end of the current entry's arrayOfInputNodes.

Finally, the Forward and Backward Global Path Arrays are merged to find the optimal sequence set, according to the following:

-   -   Select all paths that satisfy the sequence length constraint,     -   Calculate Σvs_(imax) (0<i<m), where the desired weight vs_(max)         corresponds to the highest scoring element vs_(imax) of set         V_(i),     -   Calculate the path weight Σweight(e) for all the selected paths,         and     -   Drop all the paths whose path weight is less than (the desired         weight*(1−T)) or greater than (the desired-weight*(1+T)).

Each of the paths are represented by (x, y) pairs where x=v.start from V₁ and y=v.start from V_(ζ) represent the starting and ending points, respectively, of an instance of sequence G in string S. All the remaining selected paths form the set <G>.

Matching with Mismatches and Synonyms

A simple string-matching algorithm will generally produce the best results. However, in the context of the current problem, the following requirements must be met:

-   -   Since the data being dealt with is inherently noisy and has         multiple representations (for example, when synonyms occur), use         of an exact string-matching algorithm will frequently result in         the method terminating in the first step. Accordingly, the         matching method should allow for an amount of mismatches and/or         identify synonyms as matches and/or allow insertions and         deletions of some parts in the target sequence (which might         arise due to errors in transmission media, etc.), while         identifying similarity.     -   The method should not, however, be too insensitive in which case         a large number of matches (some of which may be negative         samples) may occur, resulting in decreased performance and also         decreased significance.

As a result of the foregoing requirements, a matching technique that produces positive samples, whilst being lenient enough to allow for insertion and deletion errors and capable of handling synonyms, is used. Positive samples comprise samples in a search space of a matching process that can be considered to represent matches. The sensitivity of the matching technique can be fine-tuned to the specific requirement of a particular target application. A matching technique, based on a mismatch score, is described hereinafter (appropriate modifications have to be made to base the technique on a match score):

A marker string m_(i)εM is said to match a substring SS of string S if, and only if, the mismatch score of the marker string mi against SS is less than s_(i). The mismatch score is calculated as follows:

-   -   A current symbol SS_(j) of the substring SS is input to a set of         automata that exist at the beginning of the current matching         process and a new automata is created with SS_(j) as the start         symbol. The marker string m_(i) is also passed to enable         identification of the synonyms of m_(i).     -   If any one of the automata recognize a word, the automata fires         signifying a match.     -   The weight of the word recognized is subtracted from the         mismatch score. The weight of the word (synonym) is the mismatch         score of the word against the sub-profile P_(ijk), where j is         the position where the automaton was created and k is the         position where the automaton fired.     -   The process is repeated with the next symbol SS_(j+1).

If none of the automata fire the process continues as follows:

If m_(ij) does not match SS_(i), and there is no row corresponding to symbol m_(ji) in the profile, then add 1 to mismatch. Otherwise, if a non-zero value (v) is found against the symbol m_(ij) in the profile at coluin j of p_(i) then (l−v) is added to the mismatch count. This score is calculated for the entire length of the m_(i) (ie. the sum of m_(ij) for 0<j<l_(i)) is called the mismatch score (z). Actually, the match score is (l_(i)−z) but, since this score is used to rank the various matches of m_(i) against S, the use of min z instead of max (l_(i)−z) doesn't make a difference. When the matching process for m_(i) and SS is completed, the automata's are not destroyed if the next sub-string SS contains all except SS₀ of the current sub-string SS. However, if any of the automata fire, then the match/mismatch score is set to zero. This allows for variations in length so that mismatches due to insertions or deletions of some character in the beginning of the sequence is mitigated. Edge effects are also taken care of.

FIG. 13 is a flowchart of the matching technique described hereinbefore. A pseudo-code algorithm for the matching technique is also presented in Table 6 hereinafter.

Referring to FIG. 13, the sub-string to be matched ss, the marker string m against which ss is to be matched, the profile p to be used in the matching process and an automatabag are loaded at step 1310. An automatabag is a data structure that manages automatons and provides facilities to create, locate and remove automata. When the matching process for ss starts afresh or all the automata created up until the previous step become inactive, the automatabag may be empty.

Various internal variables used in the matching process are initialized at step 1312. At step 1314, all the active automata scores are reset to zero so that if any automata subsequently fire, the mismatch score is made zero. If an automaton's score is not set to zero, upon identification of a synonym, etc., the current mismatch score will be set to the mismatch score carried when the automaton was created. Some of the automatons are created during a previous matching step, thus, automatons that stay alive are typically created near the end of the previous matching process and may carry a high penalty score. The current mismatch score should not be biased as a result thereof.

The process of FIG. 13 utilizes a mismatch score, hence the mismatch score is made zero whenever an automaton that existed at the beginning of the matching process fires. However, were the process to be adapted to use a match score, the variable used for scoring the match score should be set to zero and the score for recognizing the codon/word that the automata recognized should be added to the match score variable.

Step 1316 determines whether all the characters in the sub-string ss have been processed using the loop variable ix. If not (Y), steps 1320 and 1324 provide input to each automata in the automatabag. At step 1326, the current character is input to an active automaton selected at step 1322 using loop variable j.

At step 1328, it is determined whether the selected automaton has fired (i.e., a synonym or word in the language has been identified). If so (Y), the score is adjusted at step 1336 to eliminate the penalty whenever an automaton fires, the loop variable ix is incremented at step 1338 for selecting the next character in the sub-string ss and processing continues at step 1316. If the selected automaton has not fired (N), steps 1330 and 1332 remove automatons relating to words that cannot be identified by making those automatons inactive. Thereafter, loop variable j is incremented at step 1334 for selection of the next active automaton and processing continues at step 1316.

When there are no more automatons (N), at step 1322, a new automaton is created with the current character and score at step 1340 such that, if a synonym or word starting with the current character exists in the sub-string ss, the automaton will fire and the score of the sub-string ss will be adjusted. In essence, the sub-string's score reverts back to the score stored in the automaton upon creation thereof as the penalties added to the score up until the point where the automata fires have to be removed when a sub-word is found as a synonym.

At step 1342, it is determined whether the current character from the marker string and the current character from the sub-string match. If so (Y), the loop variable ix is incremented for selection of the next character of the sub-string ss at step 1352 and processing continues at step 1316. If the current character from the marker string and the current character from the sub-string do not match (N), it is determined, at steps 1344 and 1346 whether the profile contains a penalty associated with the current character of the substring ss at the particular position. The profile may not contain a penalty for the current character of the substring ss occuring at a particular position if such a condition did not occur in the samples used to build the profile.

If a corresponding penalty is contained in the profile (Y), at step 1346, the penalty is added to the score at step 1350. Thereafter, the loop variable ix is incremented for selection of the next character of the sub-string ss at step 1352 and processing continues at step 1316. All penalties contained in the profile are fractional (i.e., less than 1).

Alternatively, if a corresponding penalty is not contained in the profile (N), at step 1346, the maximum per-character penalty of 1 is added to the score at step 1348. Thereafter, the loop variable ix is incremented for selection of the next character of the sub-string ss at step 1352 and processing continues at step 1316.

Once the score has been calculated for a sub-string ss (N), at step 1316, the automatabag and the score are output at step 1318. The automatabag is reused for matching of the subsequent sub-string ss1 to enable synonyms across window boundaries to also be identified. As large sequences are cut into smaller sub-strings and processed, the length of the sub-string plays an important role. However, the substring ss will typically vary very little to the subsequent sub-string ss1. For example:

-   -   s=acgtata     -   ss=acgta

ss1=cagta TABLE 6 Input: ss_(i,),m_(i,)p_(i) // ss_(i) target string, m_(i) required string, p_(i), profile Output: mismatchscore For ix=0 to length(m_(i)) automatonfired=false For each automaton autom in active state and automatonfired = false autom.nextToken(ss_(i)(ix)) // ss_(i)(ix) return the ix^(th) alphabet in ss_(i) If autom.fire( ) = true then mismatchscore = autom.score( ) automatonfired=true else If autom.noNextState( ) then autom.gotoInActiveState( ) End If End for If automatonfired = false then Create new automaton autom(ss_(i)(ix),mismatchscore,mi) autom.getActive( ) If ss_(i)(ix)≠m_(i)(ix) then Elementfound=false For each row r in p_(i) If rowelement(r) = ss_(i)(ix) then mismatchscore= mismatchscore+(1−p_(i)(r,ix)) elementfound=true End if End For If elementfound=false then mismatchscore= mismatchscore+1 End If End If End If End For Return mismatchscore

An automation nis an abstract machine that recognises words in the language formed by {Σ, Gr} and is necessary for recognition and matching mof synonyms. The automaton collapses on recognition of a word in the language or when there is no next state for the current input symbol. If a next state for the current input exists, the automaton goes to that state. Recognition of a word by the automaton is indicated through an interface (this is known as ‘firing’) to the matching process.

If a language formed by Σ has no punctuation symbols, many reading frames will exist. This is taken care of by the creation of an automaton for each symbol at each position of the target string with that symbol as the starting state for the automaton. Alternatively, if the language has punctuation symbols, the punctuation information must be used in the automaton design process to enable correct recognition of the words by the automaton. For example, in English, the words ‘the’ and ‘there’ both have the same root ‘the’. The automaton therefore has to look ahead to recognize words correctly and should not trigger when the root is found. If there are no synonyms in the language, use of the automata are unnecessary.

The profile used in matching also plays an important role in the algorithm's sensitivity for identifying matching pairs. Numerous methods and techniques exist for generating such profiles—the choice of method depends on the target application. A technique that is relatively application independent, is simple to construct and has high sensitivity to positive samples, is described hereinafter.

As described hereinbefore, a profile p is a 1×k matrix, wherein p corresponds to mεM, k is the length of m and 1 is the number of elements in Σ′ (the alphabet of m). The cell values of the profile are obtained experimentally (i.e., by sampling a sufficient number of target strings to which the profile has to match).

EXAMPLE

Let the target strings be:

-   -   ‘abcde’     -   ‘accde’     -   ‘abcce’     -   ‘a_cde’

Thus, the alphabet Σ′{a,b,c,d,e,_}. The profile for the foregoing 4 target strings is shown in Table 7 hereinafter. TABLE 7 Position/Element 1 2 3 4 5 A 1 0 0 0 0 B 0 ½ 0 0 0 C 0 ¼ 1 ¼ 0 D 0 0 0 ¾ 0 E 0 0 0 ½ 1 — 0 ¼ 0 0 0

The cell values are calculated using the following formula: C _(i) =e _(k) /n

-   -   where:         -   e_(k)εΣ′, and         -   n is the number of sample target strings.

C_(ij) represents the frequency of the symbol e_(k)εΣ′ at a position j in the set of representative samples. For example, if e_(k)=‘B’ and position j=2, the number of times ‘B’ occurs in the second position of the four strings is once. This number is then divided by the number of sample target strings and results in a value of ¼.

For some applications the symbol ‘_’ may represent any of the alphabets in Σ-‘_’. In this case, each cell in the column in which the symbol occurs can be incremented by 1/(n−1) for each occurrence of the symbol, excluding the cell that corresponds to that symbol in the column,

The cell values are normalized as follows:

-   -   For each column in the generated profile, locate the non-zero         positive solution for ΣC_(i)exp(λC_(i))=1 and multiply each cell         in the column by λ.     -   If no non-zero solution exits then the cell values are not         disturbed (such a condition arises only when data has been         overfitted and this condition has to be taken into consideration         when the cut-off score is being determined).     -   The final matrix is the required profile.

Use of the above profile construction technique reduces the relative entropy since the profile is constructed from a known distribution and the target match is also required to belong to a similar distribution. Thus, if matching is performed against a random sequence then the condition Σp_(i)ss_(i)<0 is met. This allows the matching to be more insensitive to random strings and hence the chance of random strings being identified is greatly reduced.

The reason why relative entropy is reduced is as follows:

-   Given a scoring matrix and a model sequence generated independently     identically distributed according to some background distribution P,     the maximal scoring segment (MSS) within the sequence can be     identified. The complete, full-length sequence represents one     message, while the MSS reported by an embodiment of the present     invention constitutes another. For example, a hydrophobicity scoring     matrix that assigns increasingly positive scores to more hydrophobic     amino acids, zero score to amphipathic residues, and increasingly     negative scores to more hydrophilic residues, can be created. By     searching for the MSS—the “most hydrophobic” segment in this case—a     portion of the sequence whose letters exhibit a different,     hydrophobic distribution than the random background is selected. By     convention, the distribution of letters in the MSS is called the     target distribution Q. If the letters in the MSS are described using     an optimal Shannon code for the background distribution, a longer     description is expected than for a code optimized for the target     distribution. The extra bits—the extra description length—indicate     the relative odds that the MSS arose by chance from the background     distribution rather than the target. Similarly, in the current     context, a gene can be found in many genomes whose background     frequencies vary considerably. However, the target distribution is     of interest on account of remaining similar or identical for a given     gene/marker. When building the substitution matrices, the background     frequencies are assumed to be independently identically distributed.

The existing substitution matrices can be used, however the target sequence should be identically distributed to those sequences that were used to build the substitution matrix. DNA substitution matrices will not be sensitive enough if the target sequence and marker's background distribution vary considerably. When the marker is constructed by observing the gene's signature in various organisms, which is often the case, the rate of mutations (of bases) among these organisms will vary and cannot be satisfactorily combined to reflect the genomes collectively. If the target genome's position in the generation tree does not fall within the first few generations, a great deal of variation in the observed mutation and the expected mutation will also result (the mutation rate based on which the marker was constructed). Thus, in situations where the profile has to constructed from sources that need not be closely related (such as the E.coli and human genome), the above-mentioned technique works best.

If the profiles are constructed using the above-mentioned method then the cut-off score used to identify matching and non-matching segments plays a very important role. The value of the cut-off score has to be identified using statistical techniques. For example, generate random sequences from distributions which closely model genomic data, use actual sequences that have to be identified and mutated sequences (allowable mutations). Find the scores that get generated when the profile is used to match against each of these sequences, based on the misclassification cost that you are allowed to use select the score that divided this space into regions that are considered mismatches and matches. Hence the above method is generic and applicable to all circumstances.

The use of profiles is simpler than other methods and the effectiveness of the profiles can be statistically determined. The construction of profiles does not require negative samples nor the training process associated with neural networks. Use of automata in conjunction with profiles results in a relatively more flexible method that offers all the features of a neural network solution at no additional cost.

Normalization of Scoring and/or Searching Spaces

The score for a path is the sum of the scores of each v_(i) occurring in the path. However, scores that are not normalized to their length and weight cannot be added due to a difference in search space and scoring space.

An example of an unnormalized search space is that long strings possess high scores even when not very good matches. Short strings possessing a relatively higher degree of similarity may, however, score lower than longer strings on account of their relative length.

An example of an unnormalized scoring space is when strings evaluated by a first scoring system are compared to strings evaluated by another scoring system that uses much greater weights than the first scoring system.

Hence, it is necessary and/or advantageous that scores be normalized before addition and comparison. Moreover, each vs_(max) should be normalized before calculating the desired weight. Thus, the arc weight of an arc e is given by: weight(e)=N(v _(i), length(v _(i)))+N(v _(j), length(v _(i)))

-   -   where:         -   N(x, l ) is a normalizing function.             A Normalizing Function

For two sequences A={x₁, x₂, . . . x_(n)} and B={y₁, y₂, . . . y_(n)}, the matching score not allowing for gaps is defined as: H_(i)=ΣSf(x_(i), y_(i))

-   -   where:         -   Sf(x, y) denotes the score for matching alphabet x with             alphabet y (x, yεΣ).

If A and B are independently, identically distributed, then Sf(x, y) is designed such that the expected score per alphabet is negative. This condition holds for the PAM and BLOSUM scoring families used in protein alignments, and described in the paper entitled “Methods for assessing the statistical significance of molecular sequence features by using general scoring schemes”, by Karlin, S. and Atschul, S. F., as described hereinbefore.

It has been proved that: lim H _(n)/log(n ²)=θ n→∞ holds with probability 1. The limit θ can be calculated analytically—for further details, the reader is referred to two papers by Dembo, A. and Karlin, S.:

-   “Strong limit theorems of empirical functionals for large     exceedances of partial sums of i.i.d. variables”, Ann. Prob., 19,     1737-1755; and -   “Strong limit theorems of empirical functionals for large     exceedances of partial sums of Markov variables”, Ann. Prob., 19,     1756-1767;     both of which are referenced in the paper entitled “Statistics of     large-scale sequence searching” by Sprang, R. and Vingron, M., as     described hereinbefore.

The length adjusted score for a match is given by: A _(s) =H−log(n)θ

-   -   where:         -   H is the score obtained from the matching function, and     -   n is the length of the strings being matched.

The function N(x, l) can now be defined as follows: N(x, l)=x−log(l)θ  (1)

Equation (1) caters for search space differences, but not for scoring space differences, when normalizing scores. If a uniform scoring space is used for all the matches (i.e., the profiles for all m_(i)εM belong to the same scoring space), then equation (1) would suffice. If, however, the profiles vary in scoring space, then the scores need to additionally be normalized against the scoring space. A scoring space is characterized by its natural scoring scale (λ). The value for λ can be calculated analytically for the scoring system and is a unique positive solution of the equation: Σp_(i)exp(λs_(i))=1

-   -   where:         -   l<i<r         -   r is the cardinality of Σ′ of m_(i),         -   p_(i) represents the probability of occurrence of alphabet i             in Σ′,         -   s_(i) is the score associated with that alphabet in the             scoring system.

The ftunction N(x, l) can now be defined as follows: N(x, l)=λ(x−log(l)θ)  (2)

The result of N(x, l) is in natural scale. This can be changed to any target scale by dividing equation (2) by the natural logarithm of the base of the target system.

The following equation gives the score in terms of Bit score: N _(b)(x, l)=λ(x−log(l)θ)/ln 2  (3) Computational Requirements

The time complexity of the algorithm described herein increases as a function of the number of marker strings m_(i). However, the algorithm has been described as a sequence of steps that are inherently parallel in nature:

-   -   STEP A: Matching set V_(i) for each marker string m_(i) can be         found independently of the other marker strings (M−m_(i+)).     -   STEP B: The graph Ω can be built by comparing adjacent V sets         (V_(i), V_(i),) to obtain edges independently of the other V         sets.     -   STEP C: Each path in the graph that connects an element in V₁ to         V_(ζ) can be found in parallel.

Parallelism constitutes a major advantage of the algorithm described herein. If there are n nodes and m strings in M, and k represents the average time taken to perform a match, then the matching step can be completed in O(mk/n) time. The arc generation step can be completed in O(m/2n) time.

Computer Hardware and Software

The methods, processes and/or algorithms described hereinbefore can be implemented using a computer program product in conjunction with a computer system 1400 as shown in FIG. 14. In particular, the methods, processes and/or algorithms described hereinbefore can be implemented as software, or computer readable program code, executing on the computer system 1400.

The computer system 1400 includes a computer 1450, a video display 1410, and input devices 1430, 1432. In addition, the computer system 1400 can have any of a number of other output devices including line printers, laser printers, plotters, and other reproduction devices connected to the computer 1450. The computer system 1400 can be connected to one or more other computers via a communication interface 1464 using an appropriate communication channel 1440 such as a modem communications path, an electronic network, or the like. The network may include a local area network (LAN), a wide area network (WAN), an Intranet, and/or the Internet 1420.

The computer 1450 includes the control module 1466, a memory 1470 that may include random access memory (RAM) and read-only memory (ROM), input/output (I/O) interfaces 1464, 1472, a video interface 1460, and one or more storage devices generally represented by the storage device 1462. The control module 1466 is implemented using a central processing unit (CPU) that executes or runs a computer readable program code that performs a particular function or related set of functions.

The video interface 1460 is connected to the video display 1410 and provides video signals from the computer 1450 for display on the video display 1410. User input to operate the computer 1450 can be provided by one or more of the input devices 1430, 1432 via the I/O interface 1472. For example, a user of the computer 1450 can use a keyboard as I/O interface 1430 and/or a pointing device such as a mouse as I/O interface 1432. The keyboard and the mouse provide input to the computer 1450. The storage device 1462 can consist of one or more of the following: a floppy disk, a hard disk drive, a magneto-optical disk drive, CD-ROM, magnetic tape or any other of a number of non-volatile storage devices well known to those skilled in the art. Each of the elements in the computer system 1450 is typically connected to other devices via a bus 1480 that in turn can consist of data, address, and control buses.

The methods, processes and/or algorithms described hereinbefore are effected by instructions in the software that are carried out by the computer system 1400. Again, the software may be implemented as one or more modules for implementing the method steps.

In particular, the software may be stored in a computer readable medium, including the storage device 1462 or that is downloaded from a remote location via the interface 1464 and communications channel 1440 from the Internet 1420 or another network location or site. The computer system 1400 includes the computer readable medium having such software or program code recorded such that instructions of the software or the program code can be carried out.

The computer system 1400 is provided for illustrative purposes and other configurations can be employed without departing from the scope and spirit of the invention. The foregoing is merely an example of the types of computers or computer systems with which the embodiments of the invention may be practiced. Typically, the processes of the embodiments are resident as software or a computer readable program code recorded on a hard disk drive as the computer readable medium, and read and controlled using the control module 1466. Intermediate storage of the program code and any data including entities, tickets, and the like may be accomplished using the memory 1470, possibly in concert with the storage device 1462.

In some instances, the program may be supplied to the user encoded on a CD-ROM or a floppy disk (both generally depicted by the storage device 1462), or alternatively could be read by the user from the network via a modem device connected to the computer 1450. Still further, the computer system 1400 can load the software from other computer readable media. This may include magnetic tape, a ROM or integrated circuit, a magneto-optical disk, a radio or infra-red transmission channel between the computer and another device, a computer readable card such as a PCMCIA card, and the Internet 1420 and Intranets including email transmissions and information recorded on Internet sites and the like. The foregoing are merely examples of relevant computer readable media. Other computer readable media may be practised without departing from the scope and spirit of the invention.

The methods, processes and/or algorithms described hereinbefore can be realised in a centralised fashion in one computer system 1400, or in a distributed fashion where different elements are spread across several interconnected computer systems.

Computer program means or computer program in the present context mean any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after either or both of the following: a) conversion to another language, code or notation or b) reproduction in a different material form.

The computer system 1400 is described for illustrative purposes: other configurations or types of computer systems can be equally well used to implement the described techniques. The foregoing is only an example of a particular type of computer system suitable for implementing the described techniques.

Conclusion

A method, a system and a computer program product have been described for for identifying one or more occurrences of a sequence of ordered marker strings in a string. Various modifications and substitutions can be made to the techniques and arrangements described herein, as would be apparent to one skilled in the relevant art in the light of this disclosure, without departing from the spirit and scope of the invention. 

1. A method for finding a gene in a DNA sequence, said gene represented by an ordered set of marker strings, said method comprising the steps of: identifying sub-strings in said DNA sequence that match each marker string; recording, in a set ordered according to the occurrence of said marker strings in said ordered set of marker strings, the score and position of each sub-string whose score satisfies a matching constraint; for each marker string except the last marker string in the ordered set of marker strings, creating directed links between each identified sub-string that matches said marker string and any identified sub-strings that match the subsequent marker string in the ordered sequence of marker strings, subject to said directed links satisfying an inter-marker length constraint; tracing all paths that connect each identified sub-string that matches the first marker string in said ordered set of marker strings to an identified sub-string that matches the last marker string in said ordered set of marker strings using said directed links, wherein said paths satisfy a sequence length constraint; and storing said traced paths in a memory of a computer system.
 2. The method of claim 1, wherein said step of identifying sub-strings in said DNA sequence that match said marker string includes the sub-steps of: generating a score representative of the degree of match between a marker string and a sub-string in said DNA sequence, using a profile corresponding to said marker string; and identifying said match subject to said score satisfying a predetermined constraint.
 3. The method of claim 2, wherein said profile is representative of a grouping of strings selected from the group consisting of a set of strings that match said marker string, a set of strings that do not match said marker string, and a combination thereof.
 4. The method of claim 1, wherein said inter-marker length constraint is selected from the group consisting of a minimum number of characters between sub-strings that match successive marker strings in said DNA sequence, a maximum number of characters between sub-strings that match successive marker strings in said DNA sequence, a predetermined number of characters between sub-strings that match successive marker strings in said DNA sequence, and combinations thereof.
 5. The method according to claim 1, wherein said step of tracing all paths that connect each identified sub-string that matches the first marker string in said ordered set of marker strings to an identified sub-string that matches the last marker string in said ordered set of marker strings includes the sub-steps of: selecting a sub-string corresponding to a marker string; tracing all possible forward paths from each occurrence of said sub-string to all sub-strings that match said first marker string; tracing all possible backward paths from each occurrence of said sub-string to all sub-strings that match said last marker string; and building complete paths between sub-strings that match said first marker string and sub-strings that match said last marker string, said complete paths comprising said forward paths and said backward paths.
 6. The method of claim 5, wherein said step of building complete paths includes the sub-steps of individually de-normalizing path information relating to said forward and backward paths.
 7. The method of claim 5, wherein said complete paths satisfy a sequence length constraint, said sequence length constraint selected from the group consisting of a minimum number of characters, a maximum number of characters, and a predetermined number of characters.
 8. The method of claim 7, wherein the sum of the scores of the sub-strings comprising each said complete path is within a predetermined tolerance of a designated path score, said designated path score comprising the sum of the highest scores recorded in respect of each marker string.
 9. A computer program product comprising program code recorded on a machine-readable recording medium for finding a gene in a DNA sequence, said gene represented by an ordered set of marker strings, wherein the program code comprises: program code for identifying sub-strings in said DNA sequence that match each marker string; program code for recording, in a set ordered according to the occurrence of said marker strings in said ordered set of marker strings, the score and position of each sub-string whose score satisfies a matching constraint; program code for creating, for each marker string except the last marker string in the ordered set of marker strings, directed links between each identified sub-string that matches said marker string and any identified sub-strings that match the subsequent marker string in the ordered sequence of marker strings, subject to said directed links satisfying an inter-marker length constraint; program code for tracing all paths that connect each identified sub-string that matches the first marker string in said ordered set of marker strings to an identified sub-string that matches the last marker string in said ordered set of marker strings using said directed links, wherein said paths satisfy a sequence length constraint; and program code for storing said traced paths in a memory of a computer system.
 10. The computer program product of claim 9, wherein said program code for identifying sub-strings in said DNA sequence that match said marker string includes: program code for generating a score representative of the degree of match between a marker string and a sub-string in said DNA sequence, using a profile corresponding to said marker string; and program code for identifying said match subject to said score satisfying a predetermined constraint.
 11. The computer program product of claim 10, further including program code for generating said profile, wherein said profile is representative of a grouping of strings selected from the group consisting of a set of strings that match said marker string, a set of strings that do not match said marker string, and a combination thereof.
 12. The computer program product of claim 9, wherein said inter-marker length constraint is selected from the group consisting of a minimum number of characters between sub-strings that match successive marker strings in said DNA sequence, a maximum number of characters between sub-strings that match successive marker strings in said DNA sequence, a predetermined number of characters between sub- strings that match successive marker strings in said DNA sequence, and combinations thereof.
 13. The computer program product of claim 9, wherein said program code for tracing all paths that connect each recorded sub-string that matches the first marker string in said ordered set of marker strings to a recorded sub-string that matches the last marker string in said ordered set of marker strings includes: program code for selecting a sub-string corresponding to a marker string; program code for tracing all possible forward paths from each occurrence of said sub-string to all sub-strings that match said first marker string; program code for tracing all possible backward paths from each occurrence of said sub-string to all sub-strings that match said last marker string; and program code for building complete paths between sub-strings that match said first marker string and sub-strings that match said last marker string, said complete paths comprising said forward paths and said backward paths.
 14. The computer program product of claim 13, wherein said program code for building complete paths includes program code for individually de-normalizing path information relating to said forward and backward paths.
 15. The computer program product of claim 13, wherein said complete paths satisfy a sequence length constraint, said sequence length constraint selected from the group consisting of a minimum number of characters, a maximum number of characters, and a predetermined number of characters.
 16. The computer program product of claim 15, wherein the sum of the scores of the sub-strings comprising each said complete path is within a predetermined tolerance of a designated path score, said designated path score comprising the sum of the highest scores recorded in respect of each marker string.
 17. A computer system comprising a processor and a computer readable memory unit coupled to the processor, said memory unit containing instructions that when executed by the processor implement a method for finding a gene in a DNA sequence, said gene represented by an ordered set of marker strings, said method comprising the steps of: identifying sub-strings in said DNA sequence that match each marker string; recording, in a set ordered according to the occurrence of said marker strings in said ordered set of marker strings, the score and position of each sub-string whose score satisfies a matching constraint; for each marker string except the last marker string in the ordered set of marker strings, creating directed links between each identified sub-string that matches said marker string and any identified sub-strings that match the subsequent marker string in the ordered sequence of marker strings, subject to said directed links satisfying an inter-marker length constraint; tracing all paths that connect each identified sub-string that matches the first marker string in said ordered set of marker strings to an identified sub-string that matches the last marker string in said ordered set of marker strings using said directed links, wherein said paths satisfy a sequence length constraint; and storing said traced paths in a memory of a computer system.
 18. The computer system of claim 17, wherein said step of identifying sub-strings in said DNA sequence that match said marker string includes the sub-steps of: generating a score representative of the degree of match between a marker string and a sub-string in said DNA sequence, using a profile corresponding to said marker string; and identifying said match subject to said score satisfying a predetermined constraint.
 19. The computer system of claim 18, wherein said profile is representative of a grouping of strings selected from the group consisting of a set of strings that match said marker string, a set of strings that do not match said marker string, and a combination thereof.
 20. The computer system of claim 17, wherein said inter-marker length constraint is selected from the group consisting of a minimum number of characters between sub-strings that match successive marker strings in said DNA sequence, a maximum number of characters between sub-strings that match successive marker strings in said DNA sequence, a predetermined number of characters between sub-strings that match successive marker strings in said DNA sequence, and combinations thereof.
 21. The method according to claim 17, wherein said step of tracing all paths that connect each identified sub-string that matches the first marker string in said ordered set of marker strings to an identified sub-string that matches the last marker string in said ordered set of marker strings includes the sub-steps of: selecting a sub-string corresponding to a marker string; tracing all possible forward paths from each occurrence of said sub-string to all sub-strings that match said first marker string; tracing all possible backward paths from each occurrence of said sub-string to all sub-strings that match said last marker string; and building complete paths between sub-strings that match said first marker string and sub-strings that match said last marker string, said complete paths comprising said forward paths and said backward paths.
 22. The computer system of claim 21, wherein said step of building complete paths includes the sub-steps of individually de-normalizing path information relating to said forward and backward paths.
 23. The computer system of claim 21, wherein said complete paths satisfy a sequence length constraint, said sequence length constraint selected from the group consisting of a minimum number of characters, a maximum number of characters, and a predetermined number of characters.
 24. The computer system of claim 23, wherein the sum of the scores of the sub-strings comprising each said complete path is within a predetermined tolerance of a designated path score, said designated path score comprising the sum of the highest scores recorded in respect of each marker string. 